package com.guidecaptain.java.dao.impl;

import org.springframework.stereotype.Repository;

import com.guidecaptain.core.base.dao.BaseDao;
import com.guidecaptain.java.dao.UserDao;
import com.guidecaptain.java.model.pojo.Card;
import com.guidecaptain.java.model.pojo.User;


@Repository("userDao")
public class UserDaoImpl extends BaseDao implements UserDao {

	@Override
	public int countAll() {

		return (Integer) getSqlSession().selectOne("com.guidecaptain.java.dao.UserDao.countAll");
	}

	@Override
	public int insertUser(User user) {

		return getSqlSession().insert("com.guidecaptain.java.dao.UserDao.insertUser", user);
	}

	@Override
	public int insertCard(Card card) {

		getSqlSession().insert("com.guidecaptain.java.dao.UserDao.insertCard", card);
		return 0;
	}

}